<!DOCTYPE html>
<html>
	<!--
	作者：510669408@qq.com
	时间：2017-10-16
	描述：商品展示页面
-->

	<head>
		<meta charset="utf-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<title></title>
		<script src="js/mui.min.js"></script>
		<script src="js/jquery-1.11.0.js"></script>
		<script src="js/common.js"></script>
		<script src="js/loaddata.js"></script>

		<link href="css/mui.min.css" rel="stylesheet" />
		<link href="css/maytao.css" rel="stylesheet" />
		<script type="text/javascript" charset="utf-8">
			$(document).ready(function() {
				//初始化数据
				AddData();
				ToTop('top');
				var slider = mui("#slider");
				slider.slider({
					interval: 5000
				});
			})
			 
			//点击home index加载数据
			window.addEventListener("homeclick", function(e) {
				loadnewdatabyhome(); 
			});

			mui.init({
				pullRefresh: {
					container: '#container',
					down: {
						callback: pulldownRefresh
					},
					up: {
						contentrefresh: '正在加载...',
						callback: pullupRefresh
					}
				}
			});

			/**
			 * 下拉刷新具体业务实现
			 */
			function pulldownRefresh() {
				setTimeout(function() {

					mui('#container').pullRefresh().endPulldownToRefresh(); //refresh completed
					GetNewData();
				}, 1500);
			}
			/**
			 * 上拉加载具体业务实现
			 */
			function pullupRefresh() {
				setTimeout(function() {
					mui('#container').pullRefresh().endPullupToRefresh(); //参数为true代表没有更多数据了。
					GetMoreData(localStorage.lstproid, "")

				}, 1500);
			}
			function toBaner(obj)
			{  
				var banerurl="";
			     var btitle="";
			     if(obj==1)
			     {
			     	banerurl="https://h5.m.taobao.com/app/tejia/www/taoke/index.html?pid=mm_45871999_39404541_147374618"
			     	btitle="天天特价"
			     }
			     else if(obj==2)
			     {
			     		banerurl="https://temai.m.taobao.com/index.htm?pid=mm_45871999_39404541_147374618"
			     	btitle="优惠券清单"
			     }
			      else if(obj==3)
			     {
			     	banerurl="https://s.click.taobao.com/t?e=m%3D2%26s%3DMvAdHNGCOg0cQipKwQzePCperVdZeJviK7Vc7tFgwiFRAdhuF14FMXX1u7deWAx179%2FTFaMDK6TyJ6imVk0IwPMholIlVDFC0prPmvpf4Dj%2BxaRRyatgsE2srC8Mk09eQgZss1jm63jO54LQ%2FVw1LzTxqiyRMjWOax1Jg6Rhl%2F179TQ4NozzOk5U%2BEi82A4gzf8t%2Bx6cduEhhQs2DjqgEA%3D%3D"
			     	btitle="天猫女装"
			     	 
			     }
			      else if(obj==4)
			     {
			     			banerurl="https://s.click.taobao.com/t?e=m%3D2%26s%3DFAX5qeQo78kcQipKwQzePCperVdZeJviK7Vc7tFgwiFRAdhuF14FMXnHF6z3PbFBxq3IhSJN6GTyJ6imVk0IwPMholIlVDFC0prPmvpf4Dj%2BxaRRyatgsE2srC8Mk09eQgZss1jm63jO54LQ%2FVw1LxVr30p69Glff7q8hfZ09nWcl5483ftBYykJc68oNZfHA2L3g4DBEQ0QisxQcXNpp9hP0JCOvpq2Enpxh4HutZgzRpve3RAvaiF6iPZEzXt4FSDyKszD54ooi8spkH5CmsfiFG5eM0R3OSRuBcgxpS9AQb7fGNBAK9GmeZmXRO%2B55A%2FMTQ%2BzK4ZJQHk%2Bsp%2FgaGXpuddYqmMGdan52iZavIWr38LcEqfsdGJ0QcxxBNXR1wQx%2B3qM76edzyyO9CIkVdQc6rs1qJwrxg5p7bh%2BFbQ%3D"
			     	btitle="天猫内衣"
			     }
			      else if(obj==5)
			     {
			     		banerurl="https://s.click.taobao.com/t?e=m%3D2%26s%3DDFJ4xM%2FcpWkcQipKwQzePCperVdZeJviK7Vc7tFgwiFRAdhuF14FMdMIveVMYzeD1aH1Hk3GeOjyJ6imVk0IwPMholIlVDFC0prPmvpf4Dj%2BxaRRyatgsE2srC8Mk09eQgZss1jm63jO54LQ%2FVw1L%2FqakwkHPSLU8lfrQPiGNy0k%2FCKKDVvEs%2F21zzt2X0YGK1Zpg3jx7Y1IQyhUtf3yem0iZ4gn2OpubQAYjjny3mPsGyR2wuGy2N7wOz%2FdxB7ZA0sQK0E0etVJQHk%2Bsp%2FgaGXpuddYqmMGSS3Vu17fpBrueM9XP%2BSUKpSCgDZWuOYCayfGZu4sOURyiLQrLs3WkCiLyymQfkKax%2BIUbl4zRHdDRir1IvggONbr3s8IPU6IwcaOdDXK3xC0JBh1zDM4pY5N7u7NTPnpOYQwrhPE0iw%3D"
			     	btitle="天猫男装"
			     }
				plus.storage.setItem("banerurl",banerurl);
		 		plus.storage.setItem("btitle",btitle);
		 			mui.openWindow({url: 'banner.html',id: 'banner'})
			}
		</script>
	</head>

	<body>

		<div class="mui-content">
			<div id="slider" class="mui-slider" style="height: 150px; position:fixed; z-index:999; top: 0;">
				<div class="mui-slider-group mui-slider-loop">
					<!-- 额外增加的一个节点(循环轮播：第一个节点是最后一张轮播) -->
					<div class="mui-slider-item mui-slider-item-duplicate">
					<a  onclick="toBaner(1)" href="#" >
							<img src="imgs/tttj.png">
							<p class="mui-slider-title">快乐就是天天嗨购特价商品-寐淘</p>
						</a>
					</div>
					<div class="mui-slider-item">
						<a  onclick="toBaner(2)" href="#">
							<img src="imgs/quan.png">
							<p class="mui-slider-title">潇洒就是淘宝优惠券都在你手里-淘宝优惠券</p>
						</a>
					</div>
					<div class="mui-slider-item">
						<a href="#" onclick="toBaner(1)">
							<img src="imgs/tttj.png">
							<p class="mui-slider-title">快乐就是天天嗨购特价商品-寐淘</p>
						</a>
					</div>
					
				 <!--  <div class="mui-slider-item">
						<a  onclick="toBaner(3)"href="">
							<img src="imgs/souquan.png">
							<p class="mui-slider-title">券达人，想要啥券自己搜！-优惠券搜索</p>
						</a>
					</div> -->
				 

					<!-- 额外增加的一个节点(循环轮播：最后一个节点是第一张轮播) -->
					<div class="mui-slider-item mui-slider-item-duplicate">
						<a  onclick="toBaner(2)" href="#">
							<img src="imgs/quan.png">
							<p class="mui-slider-title">潇洒就是淘宝优惠券都在你手里-淘宝优惠券</p>
						</a>
					</div>
				</div>
				<div class="mui-slider-indicator mui-text-right">
					<div class="mui-indicator mui-active"></div>
					 <div class="mui-indicator"></div 
					<!--<div class="mui-indicator"></div>
					<div class="mui-indicator"></div>
				 <div class="mui-indicator"></div>-->
				</div>
			</div>
			<div id="container" class="mui-content mui-scroll-wrapper" style="margin-top: 150px;"> 
				<div class="mui-scroll" id="content">
				</div> 
			</div> 
			<a class="top" id="top"><span class="mui-icon mui-icon-arrowup"></span><br/>顶部</a>
		</div>

	</body>

</html>